]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Bug 588445 - Use BigBox vertical alignment for the clock
authorSander Dijkhuis <sander.dijkhuis@gmail.com>
Mon, 13 Jul 2009 12:44:54 +0000 (14:44 +0200)
committerSander Dijkhuis <sander.dijkhuis@gmail.com>
Mon, 13 Jul 2009 14:16:44 +0000 (16:16 +0200)
panel.js: Replace the manual vertical padding calculation
    for the panel's clock with an y_align property on its
    BigBox container.

js/ui/panel.js

index a7f6827692282bbedd9e9d33d667223e8ae9fb86..bddb6ae6862a75a3f5f6c136c6e8dacd0611ffc6 100644 (file)
@@ -109,9 +109,7 @@ Panel.prototype = {
 
         this._clock = new Clutter.Text({ font_name: "Sans Bold 16px",
                                          text: "" });
-        let pad = (PANEL_HEIGHT - this._clock.height) / 2;
-        let clockbox = new Big.Box({ padding_top: pad,
-                                     padding_bottom: pad,
+        let clockbox = new Big.Box({ y_align: Big.BoxAlignment.CENTER,
                                      padding_left: 4,
                                      padding_right: 4 });
         clockbox.append(this._clock, Big.BoxPackFlags.NONE);